package com.starry.chat.logic.network

import com.starry.core.ext.await
import okhttp3.RequestBody


/**
 * Package:com.starry.chat.logic.network
 * Author:starr
 * Time:2024/4/6 16:21
 * Description:
 */
object AppNetWork {

    private val chatService = ServiceCreator.create(ChatService::class.java)

    suspend fun getBaiduToken(clientId: String, clientSecret: String, clientCredentials: String) =
        chatService.getBaiduToken(clientId, clientSecret, clientCredentials)?.await()

    suspend fun startChat(param: RequestBody, accessToken: String) =
        chatService.startChat(param, accessToken)?.await()
}